3.164 \(\int (f x)^m (d+e x) (a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=95 \[ \frac {d (f x)^{m+1} \left (a+b \log \left (c x^n\right )\right )}{f (m+1)}+\frac {e (f x)^{m+2} \left (a+b \log \left (c x^n\right )\right )}{f^2 (m+2)}-\frac {b d n (f x)^{m+1}}{f (m+1)^2}-\frac {b e n (f x)^{m+2}}{f^2 (m+2)^2} \]

[Out]

-b*d*n*(f*x)^(1+m)/f/(1+m)^2-b*e*n*(f*x)^(2+m)/f^2/(2+m)^2+d*(f*x)^(1+m)*(a+b*ln(c*x^n))/f/(1+m)+e*(f*x)^(2+m)
*(a+b*ln(c*x^n))/f^2/(2+m)

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {43, 2350} \[ \frac {d (f x)^{m+1} \left (a+b \log \left (c x^n\right )\right )}{f (m+1)}+\frac {e (f x)^{m+2} \left (a+b \log \left (c x^n\right )\right )}{f^2 (m+2)}-\frac {b d n (f x)^{m+1}}{f (m+1)^2}-\frac {b e n (f x)^{m+2}}{f^2 (m+2)^2} \]

Antiderivative was successfully verified.

[In]

Int[(f*x)^m*(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

-((b*d*n*(f*x)^(1 + m))/(f*(1 + m)^2)) - (b*e*n*(f*x)^(2 + m))/(f^2*(2 + m)^2) + (d*(f*x)^(1 + m)*(a + b*Log[c
*x^n]))/(f*(1 + m)) + (e*(f*x)^(2 + m)*(a + b*Log[c*x^n]))/(f^2*(2 + m))

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2350

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = IntHide[(f*x)^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x,
 x], x], x] /; ((EqQ[r, 1] || EqQ[r, 2]) && IntegerQ[m] && IntegerQ[q - 1/2]) || InverseFunctionFreeQ[u, x]] /
; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && IntegerQ[2*q] && ((IntegerQ[m] && IntegerQ[r]) || IGtQ[q, 0])

Rubi steps

\begin {align*} \int (f x)^m (d+e x) \left (a+b \log \left (c x^n\right )\right ) \, dx &=\frac {d (f x)^{1+m} \left (a+b \log \left (c x^n\right )\right )}{f (1+m)}+\frac {e (f x)^{2+m} \left (a+b \log \left (c x^n\right )\right )}{f^2 (2+m)}-(b n) \int (f x)^m \left (\frac {d}{1+m}+\frac {e x}{2+m}\right ) \, dx\\ &=\frac {d (f x)^{1+m} \left (a+b \log \left (c x^n\right )\right )}{f (1+m)}+\frac {e (f x)^{2+m} \left (a+b \log \left (c x^n\right )\right )}{f^2 (2+m)}-(b n) \int \left (\frac {d (f x)^m}{1+m}+\frac {e (f x)^{1+m}}{f (2+m)}\right ) \, dx\\ &=-\frac {b d n (f x)^{1+m}}{f (1+m)^2}-\frac {b e n (f x)^{2+m}}{f^2 (2+m)^2}+\frac {d (f x)^{1+m} \left (a+b \log \left (c x^n\right )\right )}{f (1+m)}+\frac {e (f x)^{2+m} \left (a+b \log \left (c x^n\right )\right )}{f^2 (2+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 64, normalized size = 0.67 \[ x (f x)^m \left (\frac {d \left (a+b \log \left (c x^n\right )\right )}{m+1}+\frac {e x \left (a+b \log \left (c x^n\right )\right )}{m+2}-\frac {b d n}{(m+1)^2}-\frac {b e n x}{(m+2)^2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(f*x)^m*(d + e*x)*(a + b*Log[c*x^n]),x]

[Out]

x*(f*x)^m*(-((b*d*n)/(1 + m)^2) - (b*e*n*x)/(2 + m)^2 + (d*(a + b*Log[c*x^n]))/(1 + m) + (e*x*(a + b*Log[c*x^n
]))/(2 + m))

________________________________________________________________________________________

fricas [B]  time = 0.73, size = 235, normalized size = 2.47 \[ \frac {{\left ({\left (a e m^{3} + 4 \, a e m^{2} + 5 \, a e m + 2 \, a e - {\left (b e m^{2} + 2 \, b e m + b e\right )} n\right )} x^{2} + {\left (a d m^{3} + 5 \, a d m^{2} + 8 \, a d m + 4 \, a d - {\left (b d m^{2} + 4 \, b d m + 4 \, b d\right )} n\right )} x + {\left ({\left (b e m^{3} + 4 \, b e m^{2} + 5 \, b e m + 2 \, b e\right )} x^{2} + {\left (b d m^{3} + 5 \, b d m^{2} + 8 \, b d m + 4 \, b d\right )} x\right )} \log \relax (c) + {\left ({\left (b e m^{3} + 4 \, b e m^{2} + 5 \, b e m + 2 \, b e\right )} n x^{2} + {\left (b d m^{3} + 5 \, b d m^{2} + 8 \, b d m + 4 \, b d\right )} n x\right )} \log \relax (x)\right )} e^{\left (m \log \relax (f) + m \log \relax (x)\right )}}{m^{4} + 6 \, m^{3} + 13 \, m^{2} + 12 \, m + 4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

((a*e*m^3 + 4*a*e*m^2 + 5*a*e*m + 2*a*e - (b*e*m^2 + 2*b*e*m + b*e)*n)*x^2 + (a*d*m^3 + 5*a*d*m^2 + 8*a*d*m +
4*a*d - (b*d*m^2 + 4*b*d*m + 4*b*d)*n)*x + ((b*e*m^3 + 4*b*e*m^2 + 5*b*e*m + 2*b*e)*x^2 + (b*d*m^3 + 5*b*d*m^2
 + 8*b*d*m + 4*b*d)*x)*log(c) + ((b*e*m^3 + 4*b*e*m^2 + 5*b*e*m + 2*b*e)*n*x^2 + (b*d*m^3 + 5*b*d*m^2 + 8*b*d*
m + 4*b*d)*n*x)*log(x))*e^(m*log(f) + m*log(x))/(m^4 + 6*m^3 + 13*m^2 + 12*m + 4)

________________________________________________________________________________________

giac [B]  time = 0.37, size = 217, normalized size = 2.28 \[ \frac {b f^{m} m n x^{2} x^{m} e \log \relax (x)}{m^{2} + 4 \, m + 4} + \frac {b d f^{m} m n x x^{m} \log \relax (x)}{m^{2} + 2 \, m + 1} + \frac {2 \, b f^{m} n x^{2} x^{m} e \log \relax (x)}{m^{2} + 4 \, m + 4} - \frac {b f^{m} n x^{2} x^{m} e}{m^{2} + 4 \, m + 4} + \frac {b f^{m} x^{2} x^{m} e \log \relax (c)}{m + 2} + \frac {b d f^{m} n x x^{m} \log \relax (x)}{m^{2} + 2 \, m + 1} - \frac {b d f^{m} n x x^{m}}{m^{2} + 2 \, m + 1} + \frac {a f^{m} x^{2} x^{m} e}{m + 2} + \frac {\left (f x\right )^{m} b d x \log \relax (c)}{m + 1} + \frac {\left (f x\right )^{m} a d x}{m + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

b*f^m*m*n*x^2*x^m*e*log(x)/(m^2 + 4*m + 4) + b*d*f^m*m*n*x*x^m*log(x)/(m^2 + 2*m + 1) + 2*b*f^m*n*x^2*x^m*e*lo
g(x)/(m^2 + 4*m + 4) - b*f^m*n*x^2*x^m*e/(m^2 + 4*m + 4) + b*f^m*x^2*x^m*e*log(c)/(m + 2) + b*d*f^m*n*x*x^m*lo
g(x)/(m^2 + 2*m + 1) - b*d*f^m*n*x*x^m/(m^2 + 2*m + 1) + a*f^m*x^2*x^m*e/(m + 2) + (f*x)^m*b*d*x*log(c)/(m + 1
) + (f*x)^m*a*d*x/(m + 1)

________________________________________________________________________________________

maple [C]  time = 0.24, size = 1122, normalized size = 11.81 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^m*(e*x+d)*(b*ln(c*x^n)+a),x)

[Out]

b*x*(e*m*x+d*m+e*x+2*d)/(m+1)/(m+2)*exp(1/2*(-I*Pi*csgn(I*f)*csgn(I*x)*csgn(I*f*x)+I*Pi*csgn(I*f)*csgn(I*f*x)^
2+I*Pi*csgn(I*x)*csgn(I*f*x)^2-I*Pi*csgn(I*f*x)^3+2*ln(f)+2*ln(x))*m)*ln(x^n)-1/2*x*(8*b*d*n-16*a*d*m-10*a*e*m
*x-2*ln(c)*b*d*m^3-10*ln(c)*b*d*m^2-16*ln(c)*b*d*m-10*a*d*m^2+I*Pi*b*e*m^3*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*
c)-8*a*d-2*a*e*m^3*x+2*b*d*m^2*n-4*b*e*x*ln(c)-2*a*d*m^3-8*b*d*ln(c)+2*b*e*m^2*n*x+8*b*d*m*n+4*I*Pi*b*e*m^2*x*
csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+5*I*Pi*b*d*m^2*csgn(I*c*x^n)^3+I*Pi*b*d*m^3*csgn(I*c*x^n)^3+4*I*Pi*b*d*csg
n(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*b*d*m^3*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*d*m^3*csgn(I*c*x^n)^2*csgn(I*
c)+5*I*Pi*b*e*m*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+I*Pi*b*e*m^3*x*csgn(I*c*x^n)^3-8*a*e*m^2*x+4*I*Pi*b*d*cs
gn(I*c*x^n)^3-8*ln(c)*b*e*m^2*x-10*ln(c)*b*e*m*x-2*ln(c)*b*e*m^3*x+4*I*Pi*b*e*m^2*x*csgn(I*c*x^n)^3-5*I*Pi*b*d
*m^2*csgn(I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________

maxima [A]  time = 0.64, size = 119, normalized size = 1.25 \[ \frac {b e f^{m} x^{2} x^{m} \log \left (c x^{n}\right )}{m + 2} + \frac {a e f^{m} x^{2} x^{m}}{m + 2} - \frac {b e f^{m} n x^{2} x^{m}}{{\left (m + 2\right )}^{2}} - \frac {b d f^{m} n x x^{m}}{{\left (m + 1\right )}^{2}} + \frac {\left (f x\right )^{m + 1} b d \log \left (c x^{n}\right )}{f {\left (m + 1\right )}} + \frac {\left (f x\right )^{m + 1} a d}{f {\left (m + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^m*(e*x+d)*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

b*e*f^m*x^2*x^m*log(c*x^n)/(m + 2) + a*e*f^m*x^2*x^m/(m + 2) - b*e*f^m*n*x^2*x^m/(m + 2)^2 - b*d*f^m*n*x*x^m/(
m + 1)^2 + (f*x)^(m + 1)*b*d*log(c*x^n)/(f*(m + 1)) + (f*x)^(m + 1)*a*d/(f*(m + 1))

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (f\,x\right )}^m\,\left (a+b\,\ln \left (c\,x^n\right )\right )\,\left (d+e\,x\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^m*(a + b*log(c*x^n))*(d + e*x),x)

[Out]

int((f*x)^m*(a + b*log(c*x^n))*(d + e*x), x)

________________________________________________________________________________________

sympy [A]  time = 10.29, size = 1238, normalized size = 13.03 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)**m*(e*x+d)*(a+b*ln(c*x**n)),x)

[Out]

Piecewise(((-a*d/x + a*e*log(x) + b*d*(-n/x - log(c*x**n)/x) - b*e*Piecewise((-log(c)*log(x), Eq(n, 0)), (-log
(c*x**n)**2/(2*n), True)))/f**2, Eq(m, -2)), ((a*d*log(x) + a*e*x + b*d*n*log(x)**2/2 + b*d*log(c)*log(x) + b*
e*n*x*log(x) - b*e*n*x + b*e*x*log(c))/f, Eq(m, -1)), (a*d*f**m*m**3*x*x**m/(m**4 + 6*m**3 + 13*m**2 + 12*m +
4) + 5*a*d*f**m*m**2*x*x**m/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 8*a*d*f**m*m*x*x**m/(m**4 + 6*m**3 + 13*m**
2 + 12*m + 4) + 4*a*d*f**m*x*x**m/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + a*e*f**m*m**3*x**2*x**m/(m**4 + 6*m**
3 + 13*m**2 + 12*m + 4) + 4*a*e*f**m*m**2*x**2*x**m/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 5*a*e*f**m*m*x**2*x
**m/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 2*a*e*f**m*x**2*x**m/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + b*d*f**
m*m**3*n*x*x**m*log(x)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + b*d*f**m*m**3*x*x**m*log(c)/(m**4 + 6*m**3 + 13*
m**2 + 12*m + 4) + 5*b*d*f**m*m**2*n*x*x**m*log(x)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) - b*d*f**m*m**2*n*x*x*
*m/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 5*b*d*f**m*m**2*x*x**m*log(c)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) +
 8*b*d*f**m*m*n*x*x**m*log(x)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) - 4*b*d*f**m*m*n*x*x**m/(m**4 + 6*m**3 + 13
*m**2 + 12*m + 4) + 8*b*d*f**m*m*x*x**m*log(c)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 4*b*d*f**m*n*x*x**m*log(
x)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) - 4*b*d*f**m*n*x*x**m/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 4*b*d*f**
m*x*x**m*log(c)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + b*e*f**m*m**3*n*x**2*x**m*log(x)/(m**4 + 6*m**3 + 13*m*
*2 + 12*m + 4) + b*e*f**m*m**3*x**2*x**m*log(c)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 4*b*e*f**m*m**2*n*x**2*
x**m*log(x)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) - b*e*f**m*m**2*n*x**2*x**m/(m**4 + 6*m**3 + 13*m**2 + 12*m +
 4) + 4*b*e*f**m*m**2*x**2*x**m*log(c)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 5*b*e*f**m*m*n*x**2*x**m*log(x)/
(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) - 2*b*e*f**m*m*n*x**2*x**m/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 5*b*e*f
**m*m*x**2*x**m*log(c)/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 2*b*e*f**m*n*x**2*x**m*log(x)/(m**4 + 6*m**3 + 1
3*m**2 + 12*m + 4) - b*e*f**m*n*x**2*x**m/(m**4 + 6*m**3 + 13*m**2 + 12*m + 4) + 2*b*e*f**m*x**2*x**m*log(c)/(
m**4 + 6*m**3 + 13*m**2 + 12*m + 4), True))

________________________________________________________________________________________